﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DidaManager.Native.RemoteTransmission
{
    public class BufferObject
    {
        private byte[] buffer;
        private long offset;
        private long size;

        public BufferObject(int bufferSize,int offset)
        {
            buffer = new byte[bufferSize];
            this.offset = offset;
            size = bufferSize;
        }

        public void BufferData(byte[] data, int offset, int size)
        {
            Buffer.BlockCopy(data, offset, buffer, 0, size);
            Console.WriteLine("Data buffered successfully");
        }

        public byte[] GetBuffer()
        {
            return buffer;
        }

        public long GetSize()
        {
            return size;
        }

        public long GetOffset()
        {
            return offset;
        }

        // 其他方法和属性可以在这里定义
    }
}
